using System;
using System.Collections.Generic;
using System.Text;

using System.Data;
using Husb.Data;
using Husb.Util;
using CentralOffice.Enterprise.Data;
using CentralOffice.Enterprise.DataAccess;

using EnterpriseTable = CentralOffice.Enterprise.Data.EnterpriseDataSet.EnterprisesDataTable;
using EnterpriseRow = CentralOffice.Enterprise.Data.EnterpriseDataSet.EnterprisesRow;
using ContactTable = CentralOffice.Enterprise.Data.EnterpriseContactDataSet.EnterpriseContactsDataTable;
using ContactRow = CentralOffice.Enterprise.Data.EnterpriseContactDataSet.EnterpriseContactsRow;

namespace CentralOffice.Enterprise.BusinessActions
{
    public class Enterprise : DataAccessManager<EnterpriseDataSet, EnterpriseTable, EnterpriseRow, EnterpriseAdapter>
    {
        public static EnterpriseTable Get()
        {
            return null;
        }

        public static bool Update(EnterpriseDataSet enterprise, EnterpriseContactDataSet contact)
        {
            return UpdateSelfAndDetail<EnterpriseContactAdapter, EnterpriseContactDataSet, ContactTable, ContactRow>(enterprise, contact, true, false, null);
        }

        public static EnterpriseTable FetchByQueryNumber(string queryNumber, bool exactMatch)
        {
            EnterpriseAdapter adapter = new EnterpriseAdapter();
            return adapter.FetchByQueryNumber(queryNumber, exactMatch);
        }

        public static EnterpriseTable FetchByCategoryId(Guid categoryId)
        {
            EnterpriseAdapter adapter = new EnterpriseAdapter();
            return adapter.FetchByCategoryId(categoryId);
        }

        public static EnterpriseTable FetchByAccepter(string accepter)
        {
            EnterpriseAdapter adapter = new EnterpriseAdapter();
            return adapter.FetchByAccepter(accepter);
        }

        public static int GetNoticeCountByEnterpriseId(Guid enterpriseId)
        {
            EnterpriseAdapter adapter = new EnterpriseAdapter();
            return adapter.GetNoticeCountByEnterpriseId(enterpriseId);
        }
    }
}
